﻿using UnityEngine;
using System.Collections;

public class GameManager : Singleton<GameManager>
{
	protected GameManager () {} // guarantee this will be always a singleton only - can't use the constructor!
		
	public float m_GravityY = -100.0f;
	
	private GameObject m_Marble;
	private Camera m_MainCamera;
	
	private float m_VerticalSize;
	private float m_HorizontalSize;
	
	private void Start () 
	{
		Physics.gravity = new Vector3(0, m_GravityY, 0);
		
		m_Marble = GameObject.Find("Marble");
		m_MainCamera = GameObject.Find("Main Camera").GetComponent<Camera>();
		
		m_VerticalSize = m_MainCamera.orthographicSize * 2.0f;
    	m_HorizontalSize = m_VerticalSize * Screen.width / Screen.height;
	}
	
	private void Update () 
	{
	
	}	
	
	#region Properties
	public GameObject Marble
	{
		get { return m_Marble; }
	}
	
	public Camera MainCamera
	{
		get { return m_MainCamera; }
	}
	
	public float VerticalSize
	{
		get { return m_VerticalSize; }
	}
	
	public float HorizontalSize
	{
		get { return m_HorizontalSize; }
	}
	#endregion
}

